﻿using System;
namespace Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000 {
    
    
    public partial class EhmaParinguPaev : global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguPaev {
        
        private EhmaParinguPaev.CasinobdayType @__casinobday;
        
        public EhmaParinguPaev() {
        }
        
        /// <summary>
        /// All parameters
        /// </summary>
        public EhmaParinguPaev(EhmaParinguPaev.CasinobdayType @casinobday) {
            this.@__casinobday = @casinobday;
        }
        
        /// <summary>
        /// Copy Constructor
        /// </summary>
        protected EhmaParinguPaev(IEhmaParinguPaev @ehmaParinguPaev) {
            this.@__casinobday = @ehmaParinguPaev.Casinobday;
        }
        
        public virtual EhmaParinguPaev.CasinobdayType Casinobday {
            get {
                return this.@__casinobday;
            }
            set {
                this.@__casinobday = value;
            }
        }
        
        public class CasinobdayType : global::Xtee.Core.Schema.XsdDate {
            
            public CasinobdayType(System.DateTime value) : 
                    base(value) {
                this.SuuremVordneKui = Parse("2010-01-01");
                this.Validate();
            }
            
            public CasinobdayType(string value) : 
                    base(value) {
                this.SuuremVordneKui = Parse("2010-01-01");
                this.Validate();
            }
            
            public CasinobdayType() : 
                    base(new System.DateTime()) {
            }
            
            public static bool TryParse(string value, out CasinobdayType result) {
                try {
                    result = new CasinobdayType(value);
                    return true;
                }
                catch (System.Exception ) {
                    result = null;
                    return false;
                }
            }
            
            public static implicit operator DateTime (CasinobdayType value) {
                return value.Value;
            }
            
            public static implicit operator CasinobdayType (System.DateTime value) {
                return new CasinobdayType(value);
            }
        }
    }
}
